package hn.sigit.logic.bpm;


import java.util.ArrayList;
import java.util.List;

import javax.ejb.Remove;
import javax.ejb.Stateful;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.bpm.BeginTask;
import org.jboss.seam.annotations.bpm.EndTask;
import org.jboss.seam.annotations.remoting.WebRemote;
import org.jboss.seam.bpm.PooledTaskInstanceList;
import org.jboss.seam.bpm.ProcessInstance;
import org.jboss.seam.bpm.TaskInstanceList;
import org.jbpm.taskmgmt.exe.TaskInstance;

@Stateful
@Name("bpmNav")
@Scope(ScopeType.CONVERSATION)
public class BpmNavImpl implements BpmNav {
	@In
	private ConfiguracionProcesosImpl confProceso;
	
	@WebRemote
	public String webRemote(String s) {
		return s.toUpperCase();
	}

	@BeginTask
	@Begin(join=true)
	public String startTask() {
		String taskName = org.jboss.seam.bpm.TaskInstance.instance().getTask().getName();
		return taskName;
	}
	
	@EndTask
	public String endTask() {
		return "home";
	}
	
	@Remove @Destroy
	public void destroy() {
		
	}

}
